package Cafezam;


import java.util.Scanner;

public class J12Retangle {

	public static void main(String[] args)
	{
		Retangle r = new Retangle();
		
		r.getwidth(r.getMake());
		r.getheight(r.getMake());
		r.getColor(r.getMake());
		System.out.println("면적은:"+r.getArea());
		System.out.println("둘레는:"+r.getPerimeter());
		System.out.println("색깔은:"+r.color);
		}

}
class Retangle
{
       	double	width;
        double	height;
    	String color;
    	double area;
        double perimeter;

    
     public double getArea()
    {
    	return width*height;
    }
    public double getPerimeter()
    {
    	return (width+height)*2;
    }
    public double getheight(Scanner sc)
    {
    	System.out.println("세로는");
    	height=sc.nextDouble();
    	return height;
    	
    }
 
    public double getwidth(Scanner sc)
    {
    	System.out.println("가로는:");
    	width=sc.nextDouble();
    	return width;
    	  	
    }
    
    
    public String getColor(Scanner sc)
    {
    	System.out.println("색깔은?:");
    	color=sc.next();
    	sc.close();
    	return color;
    }
    public  Scanner getMake(){
    	Scanner sc =new Scanner(System.in);
    	return sc;
   }
   public void getClose(Scanner sc)
   {
	   sc.close();
	}
        
}
